#include <vector>

class ISomething
{
    public:

    virtual int action( const std::vector<int> & values )
    {
        int counter = 0;
        for(int idx = 0; idx < values.size(); idx++)
        {
            counter += values[idx];
        }
        return counter;
    }

    virtual int action( const std::map< std::string, int> & values)
    {
        int counter = 0;
        for( std::map< std::string, int>::const_iterator iter = values.begin(); 
            iter != values.end(); iter++)
        {
            counter += iter->second;
        }
        return counter;
    }

    void crazy( const std::vector< std::pair< int, int > > & dead) {}
};

int actor(ISomething * s)
{
    std::vector<int> k;
    k.push_back(1);
    k.push_back(2);
    k.push_back(3);
    k.push_back(4);
    return s->action(k);
}

int actor2(ISomething * s)
{
    std::map< std::string, int > data;
    data["a"] = 1;
    data["ab"] = 2;
    data["abc"] = 3;
    data["abcd"] = 4;
    return s->action(data);
}
